package com.validation.validator;

import com.validation.exception.ValidationException;

import java.util.Optional;

public class IPValidator {

    public void validate(Object value,String message){
        Optional.ofNullable(value).orElseThrow(()-> new ValidationException(message));
    }

}
